/**
 * Created with IntelliJ IDEA.
 * Description:判断质数
 * User: zjc
 * Date: 2022-05-01
 * Time: 20:52
 */
import java.util.Scanner;

public class Project {
    public static void main(String[] args) {
        Project main = new Project();
        Scanner scan = new Scanner(System.in);
        int number = scan.nextInt();
        System.out.println(main.isPrimeNumber(number));
    }

    public Boolean isPrimeNumber(int number) {
        for(int i = 2; i <= (number/2); i++){
            if(number % i ==0){
                return false;
            }
        }
        return true;
    }
}
